<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户管理页面</title>
<script type="text/javascript" src="<c:url value='/admin/js/util/jquery-1.8.1.min.js' />" ></script>
<script type="text/javascript" src="<c:url value='/admin/js/util/common.js' />" ></script>
<script type="text/javascript" src="<c:url value='/admin/js/util/date.js' />" ></script>
<script type="text/javascript" src="<c:url value='/admin/js/util/My97DatePicker/WdatePicker.js' />" ></script>
<script type="text/javascript" src="<c:url value='/admin/js/cascadeSelect.js' />" ></script>
<link href="<c:url value='/admin/css/general.css' />" rel="stylesheet" type="text/css" />
<script language="javascript">
function addCustomers(o,a,b){ 
	var t=document.getElementById(o).getElementsByTagName("tr"); 
	for(var i=0;i<t.length;i++){ 
		t[i].style.backgroundColor=(t[i].sectionRowIndex%2==0)?a:b; 
		t[i].onmouseout=function(){ 
			if(this.x!="1")this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b; 
		};
	}
}
	
function returnMain() {
	document.location.href = "<c:url value='/admin/adminUserAction!list.do' />";
}

function editObj(checkedId) {
	$("#checkedIds").val(checkedId);
	$("#mainForm").attr("action", "<c:url value='/admin/adminUserAction!modify.do' />");
	$("#mainForm").submit();
}
</script>
</head>
<body>
	<form id="mainForm" action="" method="post">
		<input type="hidden" name="checkedIds" value="${ adminUser.id }" />
		
		<div class="tableTitle">查看用户</div>
		<table width="100%" cellspacing="1" id="addCustomers">
			<tr>
				<th colspan="2">注：带<b>*</b>号的为必填项
				</th>
			</tr>
			<tr>
				<td width="50%"><span>用户类型<b>*</b>：
				</span><select name="adminUser.memberType" disabled="disabled">
				<c:forEach items="${ memberTypeList }" var="item">
					<option value="${ item.constantValue }">${ item.constantName }</option>
				</c:forEach>
				</select></td>
				<td width="50%"><span>过期日期<b>*</b>：
				</span><input name="unformatExpiredDate" id="unformatExpiredDate" type="text" readonly="readonly" /></td>
			</tr>
			<tr>
				<td><span>用户名<b>*</b>：
				</span><input name="adminUser.loginName" id="userLoginName" type="text" value="${ adminUser.loginName }" readonly="readonly" /></td>
				<td><span>真实姓名<b>*</b>：
				</span><input name="adminUser.realName" id="userRealName" type="text" value="${ adminUser.realName }" readonly="readonly"/></td>
			</tr>
			<tr>
				<td><span>联系电话：</span><input name="adminUser.phoneNum" id="userPhoneNum" type="text" value="${ adminUser.phoneNum }" readonly="readonly"/></td>
				<td><span>性别<b>*</b>：
				</span><select name="adminUser.sex" disabled="disabled"><option value="1" selected="selected">男</option><option value="2" >女</option></select></td>
			</tr>
			<tr>
				<td colspan="2"><a href="javascript:editObj('${ adminUser.id }');">编辑</a><a href="javascript:returnMain();">返回</a></td>
			</tr>
		</table>
	</form>
	<script language="javascript">
	//addCustomers("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景"); 
	addCustomers("addCustomers","#fff","#F6F6F6");
	
	$(document).ready(function(){
		var expiredDate = "${ adminUser.expiredDate }";
		var expiredDate_Date = string8ToDate(new String(expiredDate));
		var expiredDate_Str = expiredDate_Date.format("yyyy-MM-dd");
		$("input[name='unformatExpiredDate']").val(expiredDate_Str);
	});
	
	selectOption("adminUser.memberType", "${ adminUser.memberType }");
	selectOption("adminUser.sex", "${ adminUser.sex }");
	</script>
</body>
</html>